import { INIT_ADDRESS } from './mutations-types.js'
export default {
    state: {
        addressList: []
    },
    getters: {
        //计算属性，输出默认地址
        defaultPath(state) {
            return state.addressList.filter(v => {
                return v.isDefault == 1
            })
        }
    },
    mutations: {
        [INIT_ADDRESS](state, list) {
            state.addressList = list
        }
    }
}